package com.demo.mapper.SysUserModules;

import com.demo.mapper.BaseMapper;
import com.demo.model.Role.Role;
import com.demo.model.SysUser.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    //通过id获取
    SysUser getUserOne(Long uid);

    //通过name获取用户
    SysUser getUserByName(String name);

    //是否有重复的手机号
    int countPhone(String phone);

    //是否有重复的手机号
    int countName(String name);


    //通过用户id查找角色
    List<Role> getRolesByUid(Long uid);
}
